﻿using System;

class Program
{
    static void Main()
    {
        string binary = "010111111111111000010101";
        string hex = String.Format("{0:X2}",Convert.ToUInt64(binary,2));
        Console.WriteLine(hex);
    }
}